<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex myComplaint_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between myComplaint_fd0_0'      >
            <view   class='flex flex-wrap align-center myComplaint_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="switchTab" :data-url="`/pages/tabBar/myss/myss`"   >
        <text class='fu-iconfont2  myComplaint_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-center'      >
        <text class='myComplaint_fd0_0_c1_c0'  >我的投诉</text>
</view>
    <view   class='flex align-center justify-end myComplaint_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myComplaint_flex_1"    >
            <template v-for = '(item,key0) in complaintList'>
    <view   class='flex flex-direction flex-wrap align-stretch myComplaint_fd1_0'   @tap="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/complaintDetaiuls/complaintDetaiuls?id=${item.aid}`"    :key='key0'>
            <view   class='flex flex-wrap align-center justify-between myComplaint_fd1_0_c0'      >
        <text class='myComplaint_fd1_0_c0_c0'  >{{item.create_time}}</text>
<text class='myComplaint_fd1_0_c0_c1'      >{{item.status_name}}</text>
</view>
<text class='myComplaint_fd1_0_c1'  >{{item.title}}</text>
<text class='myComplaint_fd1_0_c2'  >{{item.content}}</text>
    <view   class='flex flex-wrap align-center myComplaint_fd1_0_c3'      >
            <template v-for = '(child,key1) in item.picture'>
    <view   class='flex flex-wrap align-center myComplaint_fd1_0_c3_c0'       :key='key1'>
        <image class='myComplaint_fd1_0_c3_c0_c0'  mode="scaleToFill"  :src='child' @tap.stop="multiImagePreview(child,item.picture,'')" ></image>
</view>
    </template>
    
</view>
    <view   class='flex flex-wrap align-center justify-end myComplaint_fd1_0_c4'      >
        <image class='myComplaint_fd1_0_c4_c0'  mode="aspectFit"  :src='STATIC_URL+"145.png"' @tap.stop="revokeComplaintFunc(item.aid,2)" v-if= " item.status!=1"></image>
<button class='myComplaint_fd1_0_c4_c1'  @tap.stop="revokeComplaintFunc(item.aid,1)" v-if= " item.status=='1'" >撤销投诉</button><button class='myComplaint_fd1_0_c4_c1'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/complaintDetaiuls/complaintDetaiuls?id=${item.aid}`"  >查看详情</button>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"complaintList":[],"delete_id":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            this.getComplaintFunc()
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.getComplaintFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取投诉记录
                 getComplaintFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post64deead33a3ef;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {}
                this.listData = [];
                this.complaintList = this.listData;
                this.pagingListToggle();
                
                },
                //撤销&删除投诉
                async revokeComplaintFunc(aid,type){
                        let data64df50f8844f7 = await this.$api.dbPost(global.apiUrls.post64df50f8844f7, {
    aid,
    type,
});
if (!data64df50f8844f7) return
if (data64df50f8844f7.data.code != 1) {
    this.$message.info(data64df50f8844f7.data.msg);
    return
}

if (type == 1) {
    this.$message.info('撤销成功');
} else {
    this.$message.info('删除成功');
}
                setTimeout(()=>{
                            this.getComplaintFunc()
      },500)
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:rgba(246, 247, 249, 1);background-size: 100% auto;
        }
    .myComplaint_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .myComplaint_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#333333;
    }
    .myComplaint_fd0_0_c0_c0{
        font-size:36rpx;color:#333;font-weight:500;
    }
    .myComplaint_fd0_0_c0{
        width:100rpx;
    }
    .myComplaint_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;line-height:88rpx;
    }
    .myComplaint_flex_1{
        padding:20rpx 24rpx 0rpx 24rpx;
    }
    .myComplaint_fd1_0_c4_c1{
        border:1px solid #BFBFBF;background:#FFFFFF;border-radius:28rpx 28rpx 28rpx 28rpx;width:150rpx;line-height:56rpx;font-size:24rpx;color:rgba(51, 51, 51, 1);height:56rpx;margin:0rpx 0rpx 0rpx 20rpx;
    }
    .myComplaint_fd1_0_c4_c0{
        width:32rpx;height:32rpx;border-radius:0rpx 0rpx 0rpx 0rpx;margin:0rpx auto 0rpx 0rpx;
    }
    .myComplaint_fd1_0_c4{
        border-top:1px solid #eee;padding:24rpx 0rpx 24rpx 0rpx;margin:0rpx 24rpx 0rpx 24rpx;
    }
    .myComplaint_fd1_0_c3_c0_c0{
        width:200rpx;height:200rpx;border-radius:16rpx;
    }
    .myComplaint_fd1_0_c3_c0{
        margin:0rpx 8rpx 24rpx 8rpx;
    }
    .myComplaint_fd1_0_c3{
        padding:0rpx 16rpx 0rpx 16rpx;
    }
    .myComplaint_fd1_0_c2{
        margin:0rpx 24rpx 20rpx 24rpx;color:#999999;font-size:28rpx;font-weight:400;line-height:39rpx;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myComplaint_fd1_0_c1{
        margin:0rpx 24rpx 12rpx 24rpx;color:#333333;font-size:32rpx;font-weight:400;line-height:45rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myComplaint_fd1_0_c0_c1{
        color:#333333;font-size:28rpx;font-weight:500;line-height:40rpx;
    }
    .myComplaint_fd1_0_c0_c0{
        color:#999999;font-size:28rpx;font-weight:400;line-height:40rpx;
    }
    .myComplaint_fd1_0_c0{
        margin:32rpx 24rpx 20rpx 24rpx;
    }
    .myComplaint_fd1_0{
        background:rgba(255, 255, 255, 1);background-size:100% auto;border-radius:16rpx;margin:0rpx 0rpx 20rpx 0rpx;
    }
</style>